<script setup>
import { onMounted } from 'vue';

// 配置 Dify 聊天机器人
window.difyChatbotConfig = { 
  token: 'Nfj7xSYoLCAw3cL7', 
  systemVariables: { 
    // user_id: 'YOU CAN DEFINE USER ID HERE', 
    // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID', 
  }, 
  userVariables: { 
    // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', 
    // name: 'YOU CAN DEFINE USER NAME HERE', 
  }, 
};

// 动态加载 Dify 聊天机器人脚本
onMounted(() => {
  const script = document.createElement('script');
  script.src = 'https://udify.app/embed.min.js';
  script.id = 'Nfj7xSYoLCAw3cL7';
  script.defer = true;
  document.head.appendChild(script);
});
</script>

<template>
  <RouterView />
</template>

<style scoped>
#dify-chatbot-bubble-button { 
  background-color: #1C64F2 !important; 
} 
#dify-chatbot-bubble-window { 
  width: 24rem !important; 
  height: 40rem !important; 
}
</style>